<?php

namespace App\Model\BbcModel;

use Service\Code\Normal;
use App\Model\BaseModel\BaseBbcModel;

/**
 * 户实名认证
 */
class MnCheckUser extends BaseBbcModel {

    public $table = 'ly_mn_check_user';

    /**
     * 是否申请了审核
     * @param array $param
     * @return  int
     */
    public static function check($param) {
        $has = self::where('mid', $param['mid'])->where('cid', $param['cid'])->orderBy('id', 'desc')->select(['status'])->first();
        if (!$has) {
            return 0;
        }
        if ($has->status != 1) {
            return 0;
        }
        return 1;
    }
}